/*
 * @Description: 子模块路由映射规则
 * @Author: xinqiao lxq1990.0716@qq.com
 * @Date: 2024-03-28
 * @LastEditors: xinqiao lxq1990.0716@qq.com
 * @LastEditTime: 2025-02-17
 */
import { SubmoduleRouteEnum, SubmoduleRoutePath } from '/@/enums/subModuleEnum'

/** 子模块映射规则 */
export const subModuleMap = [
  //平台管理-菜单管理
  // { current: '/plantform/permission', target: `${SubmoduleRoutePath[SubmoduleRouteEnum.PLANTFORM]}/permission` },
  //平台管理-接口管理
  // { current: '/plantform/interface', target: `${SubmoduleRoutePath[SubmoduleRouteEnum.PLANTFORM]}/interface` },
  //平台管理-角色管理
  // { current: '/plantform/roles', target: `${SubmoduleRoutePath[SubmoduleRouteEnum.PLANTFORM]}/roles` },
  //模板管理-身份模板管理
  { current: '/idtemplate/manage/add', target: `${SubmoduleRoutePath[SubmoduleRouteEnum.QUESTION]}/setting` },
  //身份管理-任务管理
  { current: '/idmanage/task', target: `${SubmoduleRoutePath[SubmoduleRouteEnum.PROCESS]}/examine-list` },
  //问卷管理-问卷管理（cms）
  { current: '/paper/paper', target: `${SubmoduleRoutePath[SubmoduleRouteEnum.CMS]}/content/question-list` },
  //内容管理-站点配置
  { current: '/site-content/home-page', target: `${SubmoduleRoutePath[SubmoduleRouteEnum.CMS]}/content/home-page` },
  //内容管理-资讯栏目
  { current: '/site-content/content-class', target: `${SubmoduleRoutePath[SubmoduleRouteEnum.CMS]}/content/content-class` },
  //内容管理-资讯管理
  { current: '/site-content/content-list', target: `${SubmoduleRoutePath[SubmoduleRouteEnum.CMS]}/content/content-list` },
  //内容管理-模板列表
  { current: '/site-content/template-list', target: `${SubmoduleRoutePath[SubmoduleRouteEnum.CMS]}/template/template-list` },
  //内容管理-模板分类
  { current: '/site-content/template-class', target: `${SubmoduleRoutePath[SubmoduleRouteEnum.CMS]}/template/template-class` },
  //工单类型维护-工单表单设置
  { current: '/orderMaintenance/type/form-settings', target: `${SubmoduleRoutePath[SubmoduleRouteEnum.QUESTION]}/work-order` },
  //工单类型维护-审批节点设置
  { current: '/orderMaintenance/type/process-config', target: `${SubmoduleRoutePath[SubmoduleRouteEnum.PROCESS]}/process-config` },

  //工作流
  //{ current: '/process/process-list', target: `${SubmoduleRoutePath[SubmoduleRouteEnum.PROCESS]}/process-list` },
  //{ current: '/process/flow-path', target: `${SubmoduleRoutePath[SubmoduleRouteEnum.PROCESS]}/flow-path` },
  //{ current: '/process/examine-list', target: `${SubmoduleRoutePath[SubmoduleRouteEnum.PROCESS]}/examine-list` },

  //问卷-表单
  //{ current: '/question/page', target: `${SubmoduleRoutePath[SubmoduleRouteEnum.QUESTION]}/page` },
]

/**
 * 获取子系统路由
 * @param currRoute 当前路由
 * @returns
 */
export const getSubModuleRoute = (currRoute: string) => subModuleMap.find((item) => item.current === currRoute)?.target
